package com.example.springstudy.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.springstudy.entity.LogEntity;
import com.example.springstudy.mapper.LogMapper;
import com.example.springstudy.service.LogService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LogServiceImpl extends ServiceImpl<LogMapper, LogEntity> implements LogService {
    @Override
    public void saveLog(LogEntity log) {
        this.save(log);
    }

    @Override
    public List<LogEntity> findAllLog(int page, int size) {
        IPage<LogEntity> ipage = new Page<>(page, size);
        return this.list(ipage);
    }
}
